#include "ProgressBar.h"

ProgressBar::ProgressBar(int x,int y,int width,int height){
	_x = x; 
	_y = y;
	_width = width; 
	_height = height;
	_perentage = 0;
}

void ProgressBar::setPercent(int percent){
	_perentage = percent;
}

void ProgressBar::draw(){
	oslDrawRect(_x,_y,_x+_width,_y+_height,GREEN);
	oslDrawFillRect(_x+1,_y+1,_x+(_width-1)*_perentage/100,_y+_height-1,WHITE);
}